package PTA.Mianxiangduixiang.ex20;

import java.util.Scanner;

public class ex20 {
    public static void main(String[] args) {
        Scanner sc=  new Scanner(System.in);
int a=0;
int b=0;
int c=0,d=0;

        String line = sc.nextLine();
        char arr[] = line.toCharArray();//转化为字符数组
        for(int i=0;i<arr.length;i++){
            if(Character.isLetter(arr[i])){
           a++;//字母个数
            }else if(Character.isWhitespace(arr[i])){
                b++;//空格个数
            }else if(Character.isDigit(arr[i])){
                c++;//数字个数
            }else{
                d++;
            }
        }
        System.out.println("字母个数："+a);
        System.out.println("数字个数："+c);
        System.out.println("空格个数："+b);
        System.out.println("其他字符个数："+d);
    }
}
